//加载地区的AJAX处理
function showDistrict(a, f) {
	if (a) {
		$.post("index.php?do=ajax&view=district&district_id="+f, {
			district_pid: a
		},
		function(c) {
			var b = c;
			if (trim(b) == "") {
				$("#district_id").html('<option value="-1"> ' + L.select_a_subsector + " </option>")
			} else {
				$("#district_id").html(b);
				$("#reload_district div.jqTransformSelectWrapper ul li a").triggerHandler("click")
			}
		},
		"text")
	}
}

//网页自动加载内容
$(document).ready(function(){

	//处理地区选择自动加载二级市
	var district_pid = $("#district_pid");
	var district_id = $("#inp_district_id");
	if (district_pid.attr("id") != null) {
		showDistrict(district_pid.val(), district_id.val());
	}

});